<template>
  <div>
    <el-container style="height: 100vh;" border="1px solid #eee">
      <el-header style="text-align: right; font-size: 12px">
<!--        <el-dropdown @command="handleCommand">-->
<!--          <i class="el-icon-setting" style="margin-right: 15px"></i>-->
<!--          <el-dropdown-menu slot="dropdown">-->
<!--            <el-dropdown-item command="a">退出登录</el-dropdown-item>-->
<!--          </el-dropdown-menu>-->
<!--        </el-dropdown>-->
<!--        <span>{{ user.username }}</span>-->
      </el-header>

      <el-container>
        <el-aside width="200px" style="background-color: rgb(238, 241, 246)">
          <el-menu router default-active="/car">
            <el-submenu index="1">
              <template slot="title"><i class="el-icon-message"></i>汽车管理</template>
              <el-menu-item-group>
                <el-menu-item index="/car">汽车信息管理表</el-menu-item>
              </el-menu-item-group>

              <el-menu-item-group>
                <el-menu-item index="/report-car">汽车数据折线图</el-menu-item>
              </el-menu-item-group>
            </el-submenu>
          </el-menu>
        </el-aside>
        <el-main>
          <router-view/>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
// export default {
//   data() {
//     return {
//       user: {},
//     }
//   },
//   methods: {
//     handleCommand(command) {
//       if (command == 'a') {
//         localStorage.removeItem("user");
//         this.$router.push("/");
//       }
//     }
//   },
//   created() {
//     this.user = JSON.parse(localStorage.getItem("user"));
//   }
// };
</script>

<style>
.el-header {
  background-color: #B3C0D1;
  color: #333;
  line-height: 60px;
}

.el-aside {
  color: #333;
}
</style>